var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;
var UploadSchema = new Schema({ 
	date: { type: Date, default: Date.now },
	typeId: ObjectId,
	fieldname: String,
	originalname: String,
	encoding: String,
	mimetype: String,
	destination: String,
	filename: String,
	path: String,
	size: Number

 });
 UploadSchema.plugin(mongoosePaginate);
var Upload = mongoose.model('Upload',UploadSchema,'upload'); // Model.paginate()
module.exports = Upload;